<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="${contextPath}/resources/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/resourcepop.js"></script>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/bootstrap/window.css">
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/icon.css">
</head>

<body>
<div id="magazineGrid"></div>


<script type="text/javascript">

$('#magazineGrid').datagrid({
   url: '${pageContext.request.contextPath}/sys/resourcemgt/resourcedetail',
    method: 'POST',
    fitColumns: true,
    singleSelect: false,
    rownumbers: true,
    pagination: true,
    nowrap: false,
    checkOnSelect: true, 
	selectOnCheck: true,
    pageSize: 5,
    pageList: [5, 10, 15],
    showFooter: true,
    columns: [[
	     {
			field : 'ck',
			checkbox : true
		}, {
			field : 'id',
			title : 'ID',
			align : 'right'
		}, {
			field : 'ids',
			title : '资源标识',
			width : 100,
			align : 'center'
		},{
			field : 'name',
			title : '资源名',
			width : 100,
			align : 'center',
			formatter:function(value,rowData,rowIndex){
				
				return "<a href='javascript:;' onclick='viewText1("+rowIndex+");' title='"+value+"'>"+value+"</a>"
			}
		} ] ],
		toolbar: [{
		    text: '增加',
		    iconCls: 'icon-add',
		    handler: function () { alert('增加') }
		}, {
		    text: '删除',
		    iconCls: 'icon-remove',
		    handler: function () { 
		    	delet($('#magazineGrid'),'${pageContext.request.contextPath}/sys/resourcemgt/delresourcedetail');
		    }
		}, '-', {
		    text: '修改',
		    iconCls: 'icon-edit',
		    handler: function () { alert('修改') }
		}]
	});
</script>
</body>
</html>